package com.example.view.module.design.fragment;

import android.os.Bundle;
import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;

import com.example.common.adapter.MenuAdapter;
import com.example.common.base.AbsFragment;
import com.example.common.model.MenuBean;
import com.example.view.R;
import com.example.view.databinding.FragEmptyBinding;

import java.util.ArrayList;
import java.util.List;

public class EmptyFragment extends AbsFragment<FragEmptyBinding> {

    public static EmptyFragment getInstance() {
        return new EmptyFragment();
    }

    @Override
    protected void init(Bundle savedInstanceState) {

    }

    @Override
    protected void initView(View view) {
        mBinding.rv.setLayoutManager(new LinearLayoutManager(mContext));
        List data = new ArrayList<>();

        for (int i = 0; i < 50; i++) {
            data.add(new MenuBean("item==" + i, 0));
        }
        mBinding.rv.setAdapter(new MenuAdapter(data));
    }

    @Override
    protected void initListener() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.frag_empty;
    }

    @Override
    protected void onRefresh() {

    }
}
